package uk.ac.ebi.pride.tools.pap;

import uk.ac.ebi.pride.tools.pap.db.ConnectionProviderFactory;
import uk.ac.ebi.pride.tools.pap.db.LocalMySqlConnectionFactory;

import java.util.List;

/**
 * @author Florian Reisinger
 *         Date: 23-Mar-2009
 * @since 0.1
 */
public class Playground {

    ///// ///// ///// ///// ///// ///// ///// ///// ///// /////
    // for quick testing

    public static void main(String[] args) throws Exception {
        AccessionProvider ag = new AccessionProvider();

        // setup for instant local use with hsqldb/MySQL
        // NOTE: the used SQL syntax (SELECT ... FOR UPDATE) is not supported by HSQLDB
//        ConnectionProviderFactory.getInstance().setConnectionProvider(LocalHsqldbConnectionFactory.getInstance());
        ConnectionProviderFactory.getInstance().setConnectionProvider(LocalMySqlConnectionFactory.getInstance());

        List<Long> accs = ag.getAccessions(7, AccessionProvider.AcCase.PROJECT);

        for (Long acc : accs) {
            System.out.println(acc);
        }


    }

}
